/* 淡紫色和蓝色结合的主题色彩方案 */

:root {
    /* 主色调 - 淡紫色系 */
    --primary-purple: #8B7ED8;
    --primary-purple-light: #A8A0E8;
    --primary-purple-dark: #6B5BB8;
    --primary-purple-lighter: #E8E4F7;

    /* 辅助色 - 蓝色系 */
    --secondary-blue: #4A90E2;
    --secondary-blue-light: #6BA6F2;
    --secondary-blue-dark: #2E7BD6;
    --secondary-blue-lighter: #E3F2FD;

    /* 渐变色组合 */
    --gradient-primary: linear-gradient(135deg, #8B7ED8 0%, #4A90E2 100%);
    --gradient-secondary: linear-gradient(135deg, #A8A0E8 0%, #6BA6F2 100%);
    --gradient-light: linear-gradient(135deg, #E8E4F7 0%, #E3F2FD 100%);
    --gradient-dark: linear-gradient(135deg, #6B5BB8 0%, #2E7BD6 100%);

    /* 背景色 */
    --bg-primary: #F8F7FF;
    --bg-secondary: #F0F4FF;
    --bg-card: #FFFFFF;
    --bg-sidebar: linear-gradient(180deg, #8B7ED8 0%, #4A90E2 100%);

    /* 文字颜色 */
    --text-primary: #2C3E50;
    --text-secondary: #5A6C7D;
    --text-light: #8B9BA8;
    --text-white: #FFFFFF;

    /* 边框和分割线 */
    --border-light: #E8E4F7;
    --border-medium: #D1C7F0;
    --border-dark: #8B7ED8;

    /* 阴影 */
    --shadow-light: 0 2px 8px rgba(139, 126, 216, 0.1);
    --shadow-medium: 0 4px 16px rgba(139, 126, 216, 0.15);
    --shadow-heavy: 0 8px 32px rgba(139, 126, 216, 0.2);

    /* 状态色 */
    --success-color: #67C23A;
    --warning-color: #E6A23C;
    --error-color: #F56C6C;
    --info-color: #909399;

    /* 悬停效果 */
    --hover-bg: rgba(139, 126, 216, 0.1);
    --hover-shadow: 0 4px 12px rgba(139, 126, 216, 0.2);

    /* 激活状态 */
    --active-bg: rgba(139, 126, 216, 0.15);
    --active-border: #8B7ED8;
}

/* 暗色主题变量 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1A1A2E;
        --bg-secondary: #16213E;
        --bg-card: #0F3460;
        --bg-sidebar: linear-gradient(180deg, #6B5BB8 0%, #2E7BD6 100%);

        --text-primary: #E8E4F7;
        --text-secondary: #B8C5D1;
        --text-light: #8B9BA8;

        --border-light: #2A2A3E;
        --border-medium: #3A3A4E;
        --border-dark: #8B7ED8;

        --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
        --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
}

/* 全局样式重置和优化 */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 卡片样式 */
.theme-card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.theme-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

/* 按钮样式 */
.theme-button {
    background: var(--gradient-primary);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.theme-button:hover {
    background: var(--gradient-dark);
    box-shadow: var(--hover-shadow);
    transform: translateY(-1px);
}

.theme-button:active {
    transform: translateY(0);
}

/* 输入框样式 */
.theme-input {
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 126, 216, 0.1);
    outline: none;
}

/* 菜单样式 */
.theme-menu {
    background: var(--bg-sidebar);
    border-radius: 0;
}

.theme-menu-item {
    color: var(--text-white);
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 8px;
}

.theme-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.theme-menu-item.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-light);
}

/* 图标样式 */
.theme-icon {
    color: var(--primary-purple);
    transition: color 0.3s ease;
}

.theme-icon:hover {
    color: var(--secondary-blue);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-dark);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    :root {
        --shadow-light: 0 1px 4px rgba(139, 126, 216, 0.1);
        --shadow-medium: 0 2px 8px rgba(139, 126, 216, 0.15);
        --shadow-heavy: 0 4px 16px rgba(139, 126, 216, 0.2);
    }

    .theme-card {
        border-radius: 8px;
    }

    .theme-button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

